package com.cdream.basic.classiccase.miaosha.controller;


import com.cdream.basic.classiccase.miaosha.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zs
 * @since 2021-07-17
 */
@RestController
@RequestMapping("/miaosha/item")
public class ItemController {
    @Autowired
    private ItemService itemService;
    @RequestMapping("get_all_items")
    public Object getAllItems(){
        return itemService.list();
    }
    @RequestMapping("/public_promo")
    public void publishPromo(Integer itemId){
        itemService.publishPromo(itemId);
    }
}
